<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div class="layui-inline" id="hideYX" style="text-align: center">
    <label class="layui-form-label layui-inline shop-name" id='YDName'>开户人</label>

    <div class="layui-inline" style="display: inline-block">
        <select name="appointMsg" lay-filter="appointMsg" id="appointMsg"
                lay-search="">
            <option value=''>全部</option>
        </select>
    </div>
</div>
</body>
<script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
<script>
    $(function () {
        const yhkId = [[${gcgWsjdYinhangkaId}]];
        let url = "/gcgWsjd/yhkList";
        $.ajax({
            type: "get",
            url: url,
            async: false,
            success: function (date) {
                for (let i = 0; i < date.length; i++) {
                       if(yhkId==date[i].gcgWsjdYinhangkaId ){
                           $("#appointMsg").append('<option selected  value="' + date[i].gcgWsjdYinhangkaId + ' ">' + date[i].khMing + '</option>');
                       }else{
                        $("#appointMsg").append('<option value="' + date[i].gcgWsjdYinhangkaId + ' ">' + date[i].khMing + '</option>');
                       }
                }
            }
        });
    });

    function back() {
        return $("#appointMsg").find("option:selected").text();
    }

    function backTel() {
        return $("#appointMsg").val();
    }
</script>
</html>